import { createRouter, createWebHistory } from 'vue-router';

// 更新后的引入
import HomePage from '../views/HomePage.vue';
import AboutPage from '../views/AboutPage.vue';
import ElementPage from '../views/ElementPage.vue';
import RestaurantsPage from '../views/RestaurantsPage.vue';
import UserprofilePage from '../views/UserprofilePage.vue';

const routes = [
  {
    path: '/',
    name: 'HomePage', // 更新为新的组件名称
    component: HomePage,
  },
  {
    path: '/about',
    name: 'AboutPage', // 更新为新的组件名称
    component: AboutPage,
  },
  {
    path: '/element',
    name: 'ElementPage', // 更新为新的组件名称
    component: ElementPage,
  },
  {
    path: '/restaurants',
    name: 'RestaurantsPage',
    component: RestaurantsPage,
  },
  {
    path: '/Userprofile',
    name: 'UserprofilePage',
    component: UserprofilePage,
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
